<h1>Listing devices</h1>

<table  class="table table-striped">
  <thead>
    <tr>
      <th>Name</th>
      <th>Token</th>
      <th>Password</th>
      <th>Radchecks</th>
      <th>Company</th>
      <th>Industry</th>
      <th>Province</th>
      <th>City</th>
      <th>District</th>
      <th>Longitude</th>
      <th>Latitude</th>
      <th>Cantact</th>
      <th>Phone</th>
      <th>Online date</th>
      <th>Actions</th>
    </tr>
  </thead>

  <tbody>
    <% @devices.each do |device| %>
      <tr>
        <td><%= link_to device.name, device %></td>
        <td><%= device.token %></td>
        <td><%= device.password %></td>
        <td><%= link_to "radchecks", device_radchecks_path(device)%></td>
        <td><%= device.company %></td>
        <td><%= device.industry %></td>
        <td><%= device.province %></td>
        <td><%= device.city %></td>
        <td><%= device.district %></td>
        <td><%= device.longitude %></td>
        <td><%= device.latitude %></td>
        <td><%= device.cantact %></td>
        <td><%= device.phone %></td>
        <td><%= device.online_date %></td>
        <td><%= link_to btn_icon(:edit), edit_device_path(device) %>
        <%= link_to btn_icon(:trash), device, method: :delete, data: { confirm: 'Are you sure?' } %></td>
      </tr>
    <% end %>
  </tbody>
</table>

<br>

<%= link_to 'New Device', new_device_path, class: "btn btn-primary btn-mini" %>
